﻿@{ Layout = "~/Views/Shared/_LayoutBase.cshtml"; }

<header class="jumbotron subhead" id="overview">
	<div class="row">
		<div class="span12">
			<h1>DynamicImage</h1>
			<p class="lead">A high-performance image manipulation library for ASP.NET</p>
		
			@Html.DynamicImageTag(b => b.WithLayer(LayerBuilder.Image.SourceFile("~/Assets/Images/Desert.jpg")
															   .WithFilter(new ContentAwareResizeFilterBuilder().To(940, 300))))
		
			<hr />
		
			<h3>What is it?</h3>

			<p>DynamicImage helps you simplify the way you deal with images in your ASP.NET websites. DynamicImage uses Windows Presentation Foundation (WPF) 
				internally for bitmap manipulation. Most of the filters are written as WPF shader effects, which are compiled into fast SSE instructions, and 
				run with good performance in a server environment.</p>
			
			<pre class="prettyprint">
string imageUrl = new CompositionBuilder()
	.WithLayer(LayerBuilder.Image.SourceFile("myimage.png")
		.WithFilter(FilterBuilder.Resize.ToWidth(800))
	)
	.WithLayer(LayerBuilder.Text.Text("Hello World")
		.WithFilter(FilterBuilder.OuterGlow)
	).Url;</pre>
		</div>
		
		<div class="span8">
			<h3>Getting Started</h3>
			<p>The easiest way to get started is using NuGet. The two basic packages are:</p>
			<ul>
				<li><a href="http://nuget.org/packages/DynamicImage/">DynamicImage</a></li>
				<li><a href="http://nuget.org/packages/DynamicImage.Mvc/">DynamicImage.Mvc</a> (adds an HtmlHelper extension method for ASP.NET MVC 3)</li>
				<li><a href="http://nuget.org/packages/DynamicImage.Mvc4/">DynamicImage.Mvc4</a> (adds an HtmlHelper extension method for ASP.NET MVC 4)</li>
			</ul>
			<p>Each @Html.ActionLink("extension", "Index", "Extensions") has its own NuGet package:</p>
			<ul>
				<li><a href="http://nuget.org/packages/DynamicImage.Extensions.ContentAwareResizing/">DynamicImage.Extensions.ContentAwareResizing</a></li>
				<li><a href="http://nuget.org/packages/DynamicImage.Extensions.Pdf/">DynamicImage.Extensions.Pdf</a></li>
				<li><a href="http://nuget.org/packages/DynamicImage.Extensions.Rendered3D/">DynamicImage.Extensions.Rendered3D</a></li>
				<li><a href="http://nuget.org/packages/DynamicImage.Extensions.WebsiteScreenshot/">DynamicImage.Extensions.WebsiteScreenshot</a></li>
			</ul>
			
			<p>For more details, see the @Html.ActionLink("getting started", "Index", "GettingStarted") guide.</p>
		</div>
		
		<div class="span4">
			<h3>Requirements</h3>
			<p>DynamicImage requires .NET 4.0 or above.</p>
			<p>If you are using DynamicImage in an ASP.NET website hosted in IIS, you must enable Integrated Mode.</p>
			
			<h3>Source Code &amp; License</h3>
			<p>DynamicImage is an open source project. The source code is available on <a href="https://github.com/tgjones/dynamic-image">GitHub</a>.</p>
			<p>DynamicImage is dual-licensed under either the Apache License, Version 2.0, or the Microsoft Public License (Ms-PL). Some 
				@Html.ActionLink("extensions", "Index", "Extensions") use 3rd party components that have different license requirements.
			</p>
		</div>
	</div>
</header>